/*
 *  Bond.cpp
 *  CompoundParser
 *
 *  Created by Ryan Edwards-Crewe on 20-02-10.
 *  Copyright 2010 RECCoder. All rights reserved.
 *
 */

#include "Bond.h"

Bond::Bond() {};

Bond::~Bond() {};

int Bond::setBondData(char& ch, FILE* fptr) {
	if (4 > fscanf(fptr, "%d%d%d%s", 
				   &BOND_ID,
				   &FIRST_ATOM,
				   &SECOND_ATOM,
				   BOND_TYPE))
		return -1;
	else 
		return 0;
}

void Bond::writeBondData(int cid, FILE* fptr) {
	fprintf(fptr, "(%d, %d, %d, %d, '%s')", 
			cid,
			BOND_ID,
			FIRST_ATOM,
			SECOND_ATOM,
			BOND_TYPE);
}